let mySwiper = new Swiper('.swiper', {
  // direction: 'vertical', // 垂直切换选项
  loop: true, // 循环模式选项
  autoplay: true,

  // 如果需要分页器
  pagination: {
    el: '.swiper-pagination',
  },

  // 如果需要前进后退按钮
  navigation: {
    nextEl: '.swiper-button-next',
    prevEl: '.swiper-button-prev',
  },

  // 如果需要滚动条
  // scrollbar: {
  //   el: '.swiper-scrollbar',
  // },
})
let banks = document.querySelectorAll(".company .company-box")
console.log(banks)
let index = 0
setInterval(function () {
    banks.forEach(function (v) {
        v.style.opacity = 0
        v.style.zIndex = 1
    })
    index++
    banks[index].style.opacity = 1
    banks[index].style.zIndex = 10
    if (index >= banks.length - 1) {
        index = -1
    }
}, 2000)
let ttop = document.querySelector(" .top")
window.addEventListener("scroll",function(){
  if (this.scrollY>300){
  ttop.style.display ="block"
  } else {
    ttop.style.display ="none"
  }
})
ttop.addEventListener("click",function(){
  window.scrollTo({
    top:0,
    behavior:"smooth"
  })
})